/**
 * @param {string} text
 * @param {string} first
 * @param {string} second
 * @return {string[]}
 */
var findOcurrences = function(text, first, second) {
    let arr = text.split(' ');
    let res = [];
    for(let i = 0; i < arr.length - 2; i++) {
        if(arr[i] == first) {
            if(arr[i + 1] == second) {
                res.push(arr[i + 2]);
                // i = i + 2;
            }
        }
    }
    return res;
};
module.exports = findOcurrences;